<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<title>手机导航</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
		<link href="__STATIC__/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
		<link href="__STATIC__/css/animate.css" rel="stylesheet">
		<link href="__STATIC__/css/phone_sp.css" rel="stylesheet">
	</head>

	<body class="mob-body">
		<div class="mob-top">
			<span id="left_d">修改密码</span>
			<span data-toggle="dropdown" onclick="location='__ROOT__/index.php/Administration/Left/Pull_out'">退出</span>
		</div>
		<div>
			<div class="mob-logo">
				<img src="__STATIC__/img/logo.png" />
			</div>
			<div class="mob-lb">
				<ul>
					<li>
						<a class="mob-dh">管理</a>
						<ul class="mob-yc">
							<li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('Player/gameplayer')}">玩家管理</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('system/notice')}">公告管理</a>
                            </li>
                             <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('email/mail')}">邮件管理</a>
                            </li>
                             <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('Club/club')}">亲友圈管理</a>
                            </li>
                             <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('Money/money')}">提现管理</a>
                            </li>
                             <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('Order/order')}">订单管理</a>
                            </li>
						</ul>
					</li>
					<li>
						<a class="mob-dh">数据</a>
						<ul class="mob-yc">
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/datagk')}">概況</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/datawf')}">玩法</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/datalc')}">留存</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/datass')}">实时数据</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/dataczfx')}">充值分析</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/dataclub')}">亲友圈统计</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/president')}">高级会长</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('data/regionaldata')}">地区数据</a>
                            </li>
						</ul>
					</li>
					<li>
						<a class="mob-dh">权限</a>
						<ul class="mob-yc">
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('rule/rule_list')}">权限管理</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('rule/rule_group')}">用户组管理</a>
                            </li>
                            <li class="mob-dhli">
                                <a class="J_menuItem" href="{:url('account/account_details')}">后台账号管理</a>
                            </li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<div class="left_tc" id="left_c">
			<div class="left_nr">
				<div class="ibox-content">
                    <form role="form" class="form-inline">
                        <div class="mob-tc">
                        	<span>原始密码：</span>

                            <input type="text" placeholder="请输入原始密码" name="oldpwd" id="oldpwd" class="form-control">
                        </div>　
                        <div class="mob-tc">
                        	<span>新建密码：</span>
                            <input type="text" placeholder="请输入新密码"  name="newpwd" id="newpwd"class="form-control">
                        </div>　
                        <div class="mob-tc">
                        	<span>重复密码：</span>
                            <input type="text" placeholder="再次输入"  name="reppwd" id="reppwd" class="form-control">
                        </div>　
                        <br/>
                        <input type="button" value="确认" id="update_password_button" class="btn btn-w-m btn-info">
                        <input type="button" id="left_g" value="取消" class="btn btn-w-m">
                    </form>
                </div>
			</div>
		</div>
		<!-- 全局js -->
		<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
		<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="__STATIC__/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="__STATIC__/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="__STATIC__/js/plugins/layer/layer.min.js"></script>
		<!-- 自定义js -->
		<script src="__STATIC__/js/hAdmin.js?v=4.1.0"></script>
		<script type="text/javascript" src="__STATIC__/js/index.js"></script>
		<!-- 第三方插件 -->
		<script src="__STATIC__/js/plugins/pace/pace.min.js"></script>
		<script type="text/javascript">
			$(".mob-dh").click(function(){
				$(this).next().toggle(".mob-yc");
			});
			$("#left_g").click(function(){
			  $("#left_c").hide();
			});
			$("#left_d").click(function(){
			  $("#left_c").show();
			});
			
			$("#update_password_button").click(function(){
				if($("#oldpwd").val() == ''){
					alert('请填写原密码');
					return;
				}
				if($("#newpwd").val() == ''){
					alert('请填写新密码');
					return;
				}
				if($("#reppwd").val() == ''){
					alert('请重复填写新密码');
					return;
				}
				if($("#newpwd").val() != $("#reppwd").val()){
					alert('两次填写的新密码不一致');
					return;
				}
				$.ajax({
					url:'__ROOT__/index.php/Administration/Left/Change_the_password',
					data:{old_password:$("#oldpwd").val(),new_password:$("#newpwd").val()},
					dataType:"json",
					type:"post",
					success:function(response){
						if(response.status == 0) {
							alert(response.info);
						} else {
							alert("密码修改成功,请重新登录");
							$("#left_c").hide();
							window.location.reload();
						}
					},
					error:function(exception,error_message){
						console.log(exception.responseText);
					}
				})	
			})
			
		</script>

	</body>

</html>